package model.zerenlian.demo3;


import java.util.*;

public class Test {

    public static void main(String[] args) {
        Map list1 = new HashMap();
        Map list2 = new HashMap();
        Map list3 = new HashMap();
        Map list4 = new HashMap();
        for (int i=0 ;i<1000000;i++){
            list1.put(i,"123");
        }
        for (int i=50000 ;i<1000000;i++){
            list2.put(i,"123");
        }
        for (int i=70000 ;i<1000000;i++){
            list3.put(i,"123");
        }
        System.out.println("初始化完成");
        long time1 = System.currentTimeMillis();
        for(Iterator ite = list1.entrySet().iterator(); ite.hasNext();){
            Map.Entry entry = (Map.Entry) ite.next();
            if(null==list2.get(entry.getKey())){
                continue;
            }
            if(null==list3.get(entry.getKey())){
                continue;
            }
            list4.put(entry.getKey(),entry.getValue());
        }
        long time2 = System.currentTimeMillis();
        System.out.println(list4);
        System.out.println(list4.size());
        System.out.println("时间："+ (time2-time1));
    }
}
